//
//  UIViewController+MY.m
//  MuYing
//
//  Created by tbb on 2019/7/24.
//  Copyright © 2019 TBB. All rights reserved.
//

#import "UIViewController+MY.h"

@implementation UIViewController (MY)
-(void)_setNavShadow {
    
    self.navigationController.navigationBar.layer.shadowColor = HexColorA(0x000000, 0.6).CGColor;//RGB(70, 69, 69).CGColor;
    //2.设置阴影偏移范围
    self.navigationController.navigationBar.layer.shadowOffset = CGSizeMake(0, 2);
    //3.设置阴影颜色的透明度
    self.navigationController.navigationBar.layer.shadowOpacity = 0.07;
    
    //4.设置阴影半径
    self.navigationController.navigationBar.layer.shadowRadius = 4;
    //5.设置阴影路径
    self.navigationController.navigationBar.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.navigationController.navigationBar.bounds].CGPath;
}

-(void)_clearNavShadow {
    
    self.navigationController.navigationBar.layer.shadowColor = UIColor.clearColor.CGColor;
    //2.设置阴影偏移范围
    self.navigationController.navigationBar.layer.shadowOffset = CGSizeMake(0, 2);
    //3.设置阴影颜色的透明度
    self.navigationController.navigationBar.layer.shadowOpacity = 0.07;
    
    //4.设置阴影半径
    self.navigationController.navigationBar.layer.shadowRadius = 4;
    //5.设置阴影路径
    self.navigationController.navigationBar.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.navigationController.navigationBar.bounds].CGPath;
}
@end
